<html>
<head>
<title>catalog_index</title>
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/bootstrap-theme.min.css">
	<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/style.css">
</head>
<body>
<?php $this->load->view('admin/header'); ?>
<div class="container from ">
	<div class="page-header">
	<h1>分类列表<a class="btn btn-success pull-right" href="<?php echo site_url('/admin/catalog/add') ?>">添加</a></h1>
	</div>
	<table class="table table-bordered table-hover" cellpadding="0" cellspacing="0">
		<tr>
			<td>序号</td>
			<td>名称</td>
			<td>操作</td>
		</tr>
		<?php if(empty($catalogs)){ ?>
		<tr>
			<td class="empty" colspan="9" >没有数据</td>
		</tr>
		<?php } ?>
	<?php	
	foreach($catalogs as $catalog) {
	?>	
		<tr> 
			<td><?php echo $catalog->id;?></td>
			<td><?php echo $catalog->name;?></td>
			<td>
				<a class="btn btn-warning  btn-xs" href="<?php echo site_url('admin/catalog/eidt/'.$catalog->id)?>">修改</a>&nbsp;
				<a class="btn btn-danger  btn-xs" class="del"  href="<?php echo site_url('admin/catalog/del/'.$catalog->id)?>">删除</a>
			</td>
		</tr>
	<?php	
	}
	?>
	</table>
</div>
</body>
</html>